
#include "a.h"
int main() {
	linklist front,rear;//设置头尾结点
	front=(node*)malloc(sizeof(node));
	rear=(node*)malloc(sizeof(node));
	int_link(front,rear);
	   int input; 
      int sign=1;
	while(sign!=0){
	 menu();
     printf("please input:");
     scanf("%d",&input);
     
      switch(input){
   	    case 1://添加一个数据到队列
   		printf("add rear data\n");
   		add_link(front,rear);
   		break;
   	   case 2://从队列删除一个数据
   	    printf("delete front data\n");
    	delete_link(front,rear);
	   	break;  
       case 3://在队列中按值查找
        printf("input data of you want to find:");	
        int t;
        scanf("%d",&t);
        find_link(front,rear,t);
    	
    	break;
       case 4://销毁队列
       	printf("queue already delete\n");
       	whole_delete_link( front,rear);
       	break;
       case 5://打印队列
    	print_link( front,rear);
    	break;
       case 0://结束
    	sign=0;
    	break;
     }
     }
	
	
	
	
	
  
	return 0;
}
